/**
 * @program: equals
 * @author: JCM
 * @create: 2023-09-20 15:32
 * @description:
 **/

class Person {
    int age;

    public Person(int age) {
        this.age = age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
public class FinalReference {

    public static void main(String[] args) {
        final int[] arr = {1,2,3,4};
        arr[2] = -3; // 合法
//        arr = null; // 非法，不允许对 arr 重新赋值
        final Person p = new Person(25);
        p.setAge(24); // 合法
//        p = null; // 非法
    }
}
